<?php
/*
 *   This file is part of poat.
 *
 *   poat is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   poat is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with poat.  If not, see <http://www.gnu.org/licenses/>.
 */
 
require_once(ROOT_PATH."class/project.class.php");

$prj = new project;
$prj->status=STATUS_ACTIVE;
$plist = $loader->loadListBy($prj,$prj->listByStatus());

$pagecontent = "";
foreach ($plist as $prj) {
	$prjid = $prj->id;
	include(ROOT_PATH."includes/teamstats.php");
	if ($prj->statsupdated!=null) {
		$ar=array(util::fromUTC($prj->statsupdated,$CURRENT_USER->timezone));
		$pmessage = createMessage($LANG['statsupdated'],$ar);
	}
	$pagecontent .= "<h3>$prj->name</h3><br/>$pmessage<br/><br/>".$content."<br/>";
	if ($CURRENT_USER->groupid != GROUP_ADMIN) {
		include(ROOT_PATH."includes/userstats.php");
		$pagecontent .= $content."<br/><br/>";
	}
} 

$content = "<center>".$pagecontent."</center>";	

?>